# Replication Repo for "Averaging Over Varieties of Variance; Evidence from Survey Experiments on Immigration"

Final project for [Gov 2001/STAT E-200](https://projects.iq.harvard.edu/gov2001).

#### -- Project Status: [Active]

## Project Intro/Objective
The purpose of this project is replication and extension of the peer reviewed paper:   
Valentino, Nicholas A., et al. (2019) "Economic and cultural drivers of immigrant support worldwide." *British Journal of Political Science*, 49 (4) : 1201-1226.  

* Link to original [*paper*](https://www.cambridge.org/core/journals/british-journal-of-political-science/article/economic-and-cultural-drivers-of-immigrant-support-worldwide/02BBCF09B063FCD0C252B6D78E748DE8)
* link to [*supplementary materials*](https://www.cambridge.org/core/journals/british-journal-of-political-science/article/economic-and-cultural-drivers-of-immigrant-support-worldwide/02BBCF09B063FCD0C252B6D78E748DE8#fndtn-supplementary-materials)
* the paper's data can be found on [*dataverse*](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/R5MEKK)).] 


### Technologies
* R 
* organization tools:  
    * [renv](https://rstudio.github.io/renv/articles/renv.html)

## Getting Started

1. open `project.Rproj`
2. call `renv::restore()` to restore the state of your project from renv.lock.

### development
* run `variance_functions.R` to create the `variance_data/` models and graphs
* knit `Replication_Paper_Final_Submission.Rmd` to create `Replication_Paper_Final_Submission.pdf`


## Files:

Report:

* `Replication_Paper_Final_Submission.pdf` - Submission of replication paper


Scripts:

* `Replication_Paper_Final_Submission.Rmd` - RMardown used to create `Replication_Paper_Final_Submission.pdf`
* `variance_functions.R` - The Rscript that runs the varriance models and generates/saves graphs in `variance_data/` folder.
* `bibliography.bib` - file with BibTeX referances used in `Replication_Paper_Final_Submission.Rmd`
* `stata_models_in_r.Rmd` - replicate Valentino et al. (2019) models in R

Data Files:

* `imm.bjpols.dta` - replication data from Valentino et al. (2019)
* `variance_data/` - .rda files that store interium data and graphs :
    a. `bycon` : List of ML estimates by country
    b. `plot/plotlist` : Various plots for the rmd
    c. `restabs`: simulation outputs


Organizational Files:

* `README.md` - The project's readme files
* `renv.lock` - The lockfile, describing the state of your project’s library at some point in time.
* `.Rprofile`	- Used to activate renv for new R sessions launched in the project.
* `project.Rproj` - project file this file contains the project options and can be used to open the project directly from the filesystem


## Contributing Members
Authors: [Mohit Negi](https://github.com/mohitnegi14), [Emma Pendl-Robinson](https://github.com/pendlrobinson), and [Marco Scipioni](https://github.com/scipima)

